package com.hmall.mapper;

import com.hmall.model.MallProductPlan;
import com.hmall.util.MyMapper;
import com.hmall.vo.PlanMonthVo;
import com.hmall.vo.PlanVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface MallProductPlanMapper extends MyMapper<MallProductPlan> {
    List<PlanVo> selectPlanList(@Param("status") Integer status,@Param("dept_id") Integer dept_id);

    List<PlanVo> selectPlanListBySearch(@Param("status") Integer status,@Param("dept_id") Integer dept_id,@Param("plan_no") String plan_no);

    List<MallProductPlan> selectByMonth(@Param("dealer_id") Integer dealer_id, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<PlanVo> selectSalesManPlanList(@Param("user_id") Integer user_id,@Param("status") Integer status);

    List<PlanVo> selectSalesManPlanListBySearch(@Param("status") Integer status,@Param("user_id") Integer user_id,@Param("plan_no") String plan_no);

    List<PlanVo> selectMyCustomerPlanList(@Param("salesman_id") Integer salesman_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime,@Param("customer_id") Integer customer_id,@Param("plan_id") Integer plan_id);

    List<PlanVo> selectDealerCustomerPlanList(@Param("startTime") Date startTime,@Param("endTime") Date endTime,@Param("customer_id") Integer customer_id,@Param("plan_id") Integer plan_id);

    List<PlanMonthVo> selectPlanMonthList(@Param("dealer_id") Integer dealer_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<MallProductPlan> checkPlan(@Param("user_id") Integer user_id,@Param("date") Date date);

    MallProductPlan selectByNo(@Param("planNo") Long planNo);
}